package com.wlhse.controller;

import com.wlhse.dto.inDto.LoginIPadInDto;
import com.wlhse.service.AndroidVersionService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController("AndroidVersionController")
@RequestMapping("/api/v1")
public class AndroidVersionController {

    @Resource
    private AndroidVersionService androidVersionService;

    @RequestMapping(value = "/version",method = RequestMethod.POST, produces = "application/json; charset=utf-8")
    public String PingLogin(@RequestBody(required = false) LoginIPadInDto loginIPadInDto){
        return  androidVersionService.getVersion(loginIPadInDto.getServerVersion());
    }
}
